package cn.itcast.erp.entity.utils;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * log4j
 * @author 周昌洋
 * @date 2019/6/4
 */

public class LogUtils {

    public static final Logger logger = LoggerFactory.getLogger(LogUtils.class);


    private LogUtils(){

    }

    public static final void debug(Object... arr){

        for (int i = 0; i < arr.length; i++) {

            logger.error("打印{}级日志:" + arr[i] + "", "ERROR");
            logger.warn("打印{}级日志:" + arr[i] + "", "WARN");
            logger.info("打印{}级日志:" + arr[i] + "", "INFO");
            logger.debug("打印{}级日志:" + arr[i] + "", "DEBUG");

        }

    }

    public static final void inf(Object... arr) {

        for (int i = 0; i < arr.length; i++) {

            logger.error("打印{}级日志:" + arr[i] + "", "ERROR");
            logger.warn("打印{}级日志:" + arr[i] + "", "WARN");
            logger.info("打印{}级日志:" + arr[i] + "", "INFO");

        }
    }

    public static final void warn(Object... arr) {

        for (int i = 0; i < arr.length; i++) {

            logger.error("打印{}级日志:" + arr[i] + "", "ERROR");
            logger.warn("打印{}级日志:" + arr[i] + "", "WARN");



        }
    }

    public static final void erro(Object... arr) {

        for (int i = 0; i < arr.length; i++) {

            logger.error("打印{}级日志:" + arr[i] + "", "ERROR");



        }
    }



}
